#include <iostream>
#include <signal.h>

using namespace std;

int count = 1;

void signal_handler(int signum) {

	cout<<endl<<::count++<<endl<<"get SIGINT"<<endl;
}

int main() {
	signal(SIGINT,signal_handler);

	int x = 500000;
	while(x--)
	{
		cout<<"I'm main!!"<<endl;
		sleep(5);
	}
}
